package com.costeaalex.MIDlets.remote.screens;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.StringItem;

import com.costeaalex.MIDlets.remote.BlueMIDlet;

public class ScreenConnecting extends Form implements CommandListener
	{
	
	private StringItem bodyText;
	private Command cmExit;
	private BlueMIDlet midlet;
	
	public ScreenConnecting(String title, BlueMIDlet midl)
		{
		super(title);
		bodyText=new StringItem("", "Connecting...");
		this.append(bodyText);
		cmExit=new Command("Exit", Command.EXIT, 1);
		midlet=midl;
		this.addCommand(cmExit);
		this.setCommandListener(this);
		}

	public void commandAction(Command c, Displayable d)
		{
		if(c==cmExit)
			{
			midlet.shutDown();
			}
		}

	}
